--[[
-- Author:      feilong
-- DateTime:    2020-10-10 17:19:33
-- Description: 节点的服务管理
    为了更方便的取得节点中各服务的信息，
--]]


local skynet = require "skynet"


local MessageHandler = class("MessageHandler")

---------------------------------------------------------
-- Private
---------------------------------------------------------
function MessageHandler:ctor()
	self.services = {}
	self:register()	
end

--注册本服务里的消息
function MessageHandler:register()    
    g.Log():debug("i am manager register!")
    self.message_dispatch = g.MsgDis()
    self.message_dispatch:register('start', handler(self, self.start))

end


---------------------------------------------------------
-- CMD
---------------------------------------------------------
function MessageHandler:start()
    g.Log():debug("manger start")
    g.Message():callService(".launcher", "LIST")
    g.Log():debug("list--> ", list, skynet.self())


 --    skynet.fork(function ( ... )
	-- 	skynet.sleep(500)
	-- 	g.Log():error("________444444", g.cluster_manager:getNodeByType("nodeserver") )
	-- end)

end




return MessageHandler